import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: HomeView,
    children:[
      {
        path: '/sys-admin/temp/salesReason/add-new',
        component: () => import('../views/sys-admin/temp/ReasonReturnView.vue')
      },
      {
        path: '/sys-admin/temp/salesReturn/add-new',
        component: () => import('../views/sys-admin/temp/ReturnApplicationView.vue')
      },
      {
        path: '/sys-admin/temp/userList/add-new',
        component: () => import('../views/sys-admin/temp/UserListView.vue')
      },
      {
        path: '/sys-admin/temp/roleList/add-new',
        component: () => import('../views/sys-admin/temp/RoleListView.vue')
      }
    ]
  },
  {
    path: '/about',

    component: () => import('../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
